<?php 
/**
 * 运行
 * @author Yuwei(yuwei1122@gmail.com)
 *
 */
class BluePhp_Core_Run
{
	/**
	 * 系统启动方法
	 */
	public static function run()
	{
		$a = BluePhp_Library_Input_Adapter::get('a')?BluePhp_Library_Input_Adapter::get('a'):'index';//获取控制器
		$a .= 'Action';
		$f = BluePhp_Library_Input_Adapter::get('f')?BluePhp_Library_Input_Adapter::get('f'):'index';//获取方法
		if(class_exists($a))
		{
			if(method_exists($a, $f))
			{
				$class = new $a;
				$class->{$f}();
			}
			else
				die('funciton '.$f.' is not found');
		}
		else
			die('controller '.$a.' is not found');
	}
}
?>